# $Id: PKGBUILD 182901 2013-04-16 04:01:09Z eric $

pkgname=perl-ev
pkgver=4.15
pkgrel=1
pkgdesc='perl interface to libev, a high performance full-featured event loop'
arch=(i686 x86_64)
license=(PerlArtistic GPL)
options=(!emptydirs)
depends=(perl-common-sense)
url=https://metacpan.org/release/EV
source=("http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/EV-$pkgver.tar.gz")
md5sums=('546d10fb5901f2af937e53b41a92b2bb')

build() {
  cd EV-$pkgver
  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
  unset PERL5LIB PERL_MM_OPT
  perl Makefile.PL
  make
}

check() {
  cd EV-$pkgver
  export PERL_MM_USE_DEFAULT=1
  unset PERL5LIB
  make test
}

package() {
  cd EV-$pkgver
  make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
